let _request = option => uni.$http.create().setConfig({ ...option, showLoading: false }).request()

// 获取排名列表
export const getRanklist = data => _request({ url: '/rank/list-page', data }) 

//获取收藏列表
export const collectList = data => _request({ url: '/vocabulary-collect/list-page', data }) 
//取消收藏
export const collectDetale = data => _request({ url: '/vocabulary-collect', data , method:'delete'}) 
//收藏
export const collectAdd = data => _request({ url: '/vocabulary-collect', data , method:'post'}) 
// 抗遗忘列表
export const remberList = data => _request({ url: '/review-cycle/list-page', data }) 
//抗遗忘详情
export const remberDetail = data => _request({ url: '/review-cycle', data }) 
//获取消息列表
export const messageList = data => _request({ url: '/message/list', data }) 

// 获取未读消息数
export const unreadMessageNumber = () => _request({ url: '/message/un-read-message-numbers' }) 

// 删除消息
export const deleteMessages = data => _request({ url: '/message', data, method: 'delete' }) 

// 获取消息详情
export const getMessageInfo = data => _request({ url: '/message', data })

// 阅读消息
export const viewMessage = data => _request({ url: '/message/viewed', data, method: 'put' })

// 提交试课登记表
export const putAuth = data => _request({ url: '/auth', data, method: 'put' })

// 获取年级
export const gradeAll = () => _request({ url: '/grade/all' })

// 微信绑定
export const bindWechat = data => _request({ url: '/auth/bind-wechat', data, method: 'put' })

// 模板消息订阅配置
export const templatelist = data => _request({ url: '/message/template-list', data })

// 更新订阅
export const templateSubscribe = () => _request({ url: '/message/template-subscribe', method: 'put' })

/** 上传配置 */
export const cosSecret = () => _request({ url: '/upload/cos-temp-secret' });

/** 新取消收藏 */
export const cancelCollect = data => _request({ url: '/vocabulary-collect/vocabulary', method: 'delete', data });


export const speaksubmit_api = (data) => _request({ url: '/speak-exercise-log', data, method: 'post' })

/** 公共配置 */
export const userconfig_api = data => _request({ url: '/config', data });
/** 体验课 */
export const product_api = data => _request({ url: '/product', data });
// 下单
export const suborder_api = data => _request({ url: '/transaction/class-hour', data, method: 'post' });
// 支付
export const payment_api = data => _request({ url: '/payment', data, method: 'post' });
// 充值记录
export const loglist_api = data => _request({ url: '/class-hour/log-list', data });